package com.book.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.book.common.annotation.group.InsertGroup;
import com.book.common.annotation.group.UpdateGroup;
import com.book.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author Bigboss
 * @create 2024-11-10 16:42
 */
@ApiModel(description = "任务表")
@TableName("task")
public class Task extends BaseEntity {

    /**
     * 任务id
     */
    @ApiModelProperty(value = "任务id")
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @NotBlank(message = "请选择你要修改的记录",groups = {UpdateGroup.class})
    private String id;

    /**
     * 任务名称
     */
    @ApiModelProperty(value = "任务名称",required = true)
    @NotBlank(message = "请输入任务名称",groups = {InsertGroup.class,UpdateGroup.class})
    private String taskName;


    /**
     * 任务类型 1签到 2打时长
     */
    @ApiModelProperty(value = "任务类型",required = true)
    @NotBlank(message = "请选择任务类型",groups = {InsertGroup.class,UpdateGroup.class})
    private String taskType;


    /**
     * 任务时长
     */
    @ApiModelProperty(value = "任务时长")
    private Integer taskTime;


    /**
     * 任务奖励（金币）
     */
    @ApiModelProperty(value = "任务奖励",required = true)
    @NotNull(message = "请输入任务任务奖励",groups = {InsertGroup.class,UpdateGroup.class})
    private Integer taskReward;


    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @JsonIgnore
    @TableLogic
    private String delFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public Integer getTaskTime() {
        return taskTime;
    }

    public void setTaskTime(Integer taskTime) {
        this.taskTime = taskTime;
    }

    public Integer getTaskReward() {
        return taskReward;
    }

    public void setTaskReward(Integer taskReward) {
        this.taskReward = taskReward;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }


    @Override
    public String toString() {
        return "Task{" +
                "id='" + id + '\'' +
                ", taskName='" + taskName + '\'' +
                ", taskType='" + taskType + '\'' +
                ", taskTime=" + taskTime +
                ", taskReward=" + taskReward +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
